
import java.util.ArrayList;
import javax.swing.text.html.HTMLDocument.Iterator;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates and open the template
 * in the editor.
 */
/**
 *
 * @author jhon
 */
public class IteradorLineaVenta implements Iterador {

    private LineaVenta lineaVenta;
    private int index;
    private ArrayList<Producto> linea;

    public IteradorLineaVenta(ArrayList linea) {

        this.linea = linea;
    }

    public Producto next() {
        return linea.get(index++);
    }

    public void remove() {
    }

    @Override
    public boolean hasNext() {

        if (index < linea.size()) {
            return true;
        }
        return false;
    }
}
